package com.example;

import java.util.Scanner;

/**
 * @ClassName: leetcode
 * @Description:
 * @Author: csp
 * @Date:
 */
public class Work2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        while(true) {
            System.out.println("");
            String m = sc.nextLine();
            if (m.equals("end")) {
                System.out.println("over！");
                return;
            }
            System.out.println("想要退出循环输入end");
            for (int i = 0; i < m.length(); i++) {
                if (m.charAt(i) >= 'A' && m.charAt(i) <= 'Z') {
                    String a = "";
                    a += m.charAt(i);
                    System.out.print(a.toLowerCase());
                } else if (m.charAt(i) >= 'a' && m.charAt(i) < 'z') {
                    String b = "";
                    b += m.charAt(i);
                    System.out.print(b.toUpperCase());
                } else if ((int) m.charAt(i) >= 48 && (int) m.charAt(i) <= 57) {
                    String ccc = "";
                    ccc += m.charAt(i);
                    System.out.print("*");
                }
            }
        }
    }
}
